﻿using System;

namespace Coding4Fun.BoxingBots.UserConsole
{
	public static class EventController
	{
		public static EventHandler MoveForward;
		public static EventHandler MoveReverse;
		public static EventHandler MoveStrafeLeft;
		public static EventHandler MoveStrafeRight;
		public static EventHandler MoveTurnLeft;
		public static EventHandler MoveTurnRight;
		public static EventHandler PunchLeft;
		public static EventHandler PunchRight;
		public static EventHandler MoveRobot;

		public static void OnMoveForward(object sender, EventArgs e)
		{
			if (MoveForward != null)
				MoveForward(sender, e);
		}

		public static void OnMoveReverse(object sender, EventArgs e)
		{
			if (MoveReverse != null)
				MoveReverse(sender, e);
		}

		public static void OnMoveStrafeLeft(object sender, EventArgs e)
		{
			if (MoveStrafeLeft != null) 
				MoveStrafeLeft(sender, e);
		}

		public static void OnMoveStrafeRight(object sender, EventArgs e)
		{
			if (MoveStrafeRight != null)
				MoveStrafeRight(sender, e);
		}

		public static void OnMoveTurnLeft(object sender, EventArgs e)
		{
			if (MoveTurnLeft != null) 
				MoveTurnLeft(sender, e);
		}
		
		public static void OnMoveTurnRight(object sender, EventArgs e)
		{
			if (MoveTurnRight != null) 
				MoveTurnLeft(sender, e);
		}

		public static void OnPunchLeft(object sender, EventArgs e)
		{
			if (PunchLeft != null)
				PunchLeft(sender, e);
		}

		public static void OnPunchRight(object sender, EventArgs e)
		{
			if (PunchRight != null)
				PunchRight(sender, e);
		}

		public static void OnMoveRobot(object sender, EventArgs e)
		{
			if (MoveRobot != null)
				MoveRobot(sender, e);
		}
	}
}
